$('#emotion').on('click',function(){
    $('textarea').val(
        editorInfo(
            editStart()+
            textareaBeforeEnter('editor.config.emotions = {')+
            textareaBeforeEnter(textareaInline1('// 支持多组表情'))+
            textareaBeforeEnter(textareaInline1('// 第一组，id叫做 "default"'))+
            textareaBeforeEnter(textareaInline1('"default": {'))+
            textareaBeforeEnter(textareaInline2('title: "默认",  // 组名称'))+
            textareaBeforeEnter(textareaInline2('data: "./emotions.data"  // 服务器的一个json文件url，例如官网这里配置的是 http://www.wangeditor.com/wangEditor/test/emotions.data'))+
            textareaBeforeEnter(textareaInline1('},'))+
            textareaBeforeEnter(textareaInline1('// 第二组，id叫做"weibo"'))+
            textareaBeforeEnter(textareaInline1('"weibo": {'))+
            textareaBeforeEnter(textareaInline2('title: "微博表情",  // 组名称'))+
            textareaBeforeEnter(textareaInline2('data: [  // data 还可以直接赋值为一个表情包数组'))+
            textareaBeforeEnter(textareaInline3('// 第一个表情'))+
            textareaBeforeEnter(textareaInline3('{'))+
            textareaBeforeEnter(textareaInline3('"icon": "http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif",'))+
            textareaBeforeEnter(textareaInline3('"value": "[草泥马]"'))+
            textareaBeforeEnter(textareaInline3('},'))+
            textareaBeforeEnter(textareaInline3('// 第二个表情'))+
            textareaBeforeEnter(textareaInline3('{'))+
            textareaBeforeEnter(textareaInline3('"icon": "http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif",'))+
            textareaBeforeEnter(textareaInline3('"value": "[神马]"'))+
            textareaBeforeEnter(textareaInline3('}'))+
            textareaBeforeEnter(textareaInline3('// 下面还可以继续，第三个、第四个、第N个表情。。。'))+
            textareaBeforeEnter(textareaInline2(']'))+
            textareaBeforeEnter(textareaInline1('}'))+
            textareaBeforeEnter(textareaInline1('// 下面还可以继续，第三组、第四组、、、'))+
            textareaBeforeEnter('};')+
            textareaBeforeEnter(editCreat())
        )
    );
});
$('#emotionIcon').on('click',function(){
    $('textarea').val(
        editorInfo(
            editStart()+
            textareaBeforeEnter('edit.config.emotionsShow = "icon"')+
            textareaBeforeEnter(editCreat())
        )
    );
});
$('#emotionText').on('click',function(){
    $('textarea').val(
        editorInfo(
            editStart()+
            textareaBeforeEnter('edit.config.emotionsShow = "value"')+
            textareaBeforeEnter(editCreat())
        )
    );
});
